package ait.mediabroadcast.helper;

import org.teleal.cling.android.AndroidUpnpService;

import android.os.IBinder;
import android.util.Log;

public class UpnpServiceManager {

	private static AndroidUpnpService upnpService;
	
	private UpnpServiceManager(IBinder service) {
		upnpService = (AndroidUpnpService) service;
	}
	
	public static synchronized AndroidUpnpService getInstance(IBinder service) {
		if (upnpService == null) {
			new UpnpServiceManager(service);
		}

		Log.d("UpnpServiceManager", upnpService.toString());
		return upnpService;
	}
	
	public static AndroidUpnpService getInstance() {
		Log.d("UpnpServiceManager", upnpService.toString());
		return upnpService;
	}
}
